/*
* 专家库统计
* */

$(function () {

    let myChart = echarts.init(document.getElementById("csrcChart"));
    let option = {
        tooltip: { },
        grid: {
            top: 20,
            bottom: 20,
        },
        legend: {
            // data: ['降水量', '平均温度'],
            textStyle:{
                color:'#b0c2f9'
            }
        },
        xAxis: [
            {
                type: 'category',
                data: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
                axisPointer: {
                    type: 'shadow'
                },
                axisLabel: {
                    fontSize: 12,
                    color: "#b0c2f9"
                }
            }
        ],
        yAxis: [
            {
                type: 'value',
                // name: '水量',
                min: 0,
                max: 250,
                interval: 50,
                axisLabel: {
                    formatter: '{value}/',
                    fontSize: 12,
                    color: "#b0c2f9"
                },
            },
            {
                type: 'value',
                // name: '温度',
                min: 0,
                max: 25,
                interval: 5,
                axisLabel: {
                    formatter: '{value}/',
                    fontSize: 12,
                    color: "#b0c2f9"
                }
            }
        ],
        series: [
            {
                name: '人数',
                type: 'bar',
                color: ['#57af87'],
                data: [2, 5, 9, 26, 28, 70, 175, 182, 48, 18, 6, 3]
            },
            {
                name: '平均',
                type: 'line',
                yAxisIndex: 1,
                lineStyle: {
                    color: '#e6b600',
                    width: 2
                },
                data: [2, 2, 3, 4, 6, 10, 20, 23, 23, 16, 12, 6]
            }
        ]
    };

    if (option && typeof option === "object") {
        myChart.setOption(option, true);
    }

});